<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:rich="http://richfaces.org/rich">
	<script>
         function getRightTop(ref) {
           var position = new Object();
           position.top = 0; //ref.offsetTop;
           position.left = 0; // ref.offsetLeft+ref.clientWidth+6;
           return position;
         }
        </script>

	<rich:modalPanel id="#{iModalPanel}" minHeight="145" minWidth="450"
		height="150" width="453">
			<f:facet name="header">
				<h:outputText value="#{flightLinemsgs['popup.title']}" />
			</f:facet>
			<f:facet name="controls">
				<h:panelGroup>
					<h:form id="frmClosePopup">
						<h:outputLink value="#" id="closeLink">
							<h:graphicImage value="/img/close.png" />
							<rich:componentControl for="newFlightLinePopup"
								attachTo="closeLink" operation="hide" event="onclick" />
						</h:outputLink>
					</h:form>
				</h:panelGroup>
			</f:facet>
		<h:form id="frmCreateNewFlightLinePopup">
			<h:panelGrid columns="2" styleClass="flightLineInfo"
				columnClasses="flightLineInfoPanelGridCol1,flightLineInfoPanelGridCol2">
				<h:outputText value="#{flightLinemsgs['pageTitle']}" />
				<h:panelGroup>
					<h:outputText value="#{flightLinemsgs['requiredField']}" />
					<h:outputText value="*" style="color:red;" />
				</h:panelGroup>
			</h:panelGrid>
			<h:panelGrid columns="2" styleClass="inputBlock"
				columnClasses="inputBlockflightLineInfoCol1, inputBlockflightLineInfoCol2">
				<h:outputText value="#{flightLinemsgs['fromCity']}" />
				<h:panelGroup>
					<h:selectOneMenu value="#{flightLine.selectedFromCity}">
						<f:selectItems value="#{flightLine.citys}" />
					</h:selectOneMenu>
					<h:outputText value="*" style="color:red;" />
				</h:panelGroup>

				<h:outputText value="#{flightLinemsgs['toCity']}" />
				<h:panelGroup>
					<h:selectOneMenu value="#{flightLine.selectedToCity}">
						<f:selectItems value="#{flightLine.citys}" />
					</h:selectOneMenu>
					<h:outputText value="*" style="color:red;" />
				</h:panelGroup>
			</h:panelGrid>

			<h:panelGrid columns="1" styleClass="commandButtonCreateFlightLine">
				<rich:spacer width="100%" height="15" />
				<a4j:commandButton id="cmbtnCreateNewFlightLine"
					action="#{flightLine.doSave()}"
					value="#{flightLinemsgs['createFlightLine']}" reRender="#{reRender},#{iModalPanel}">
					<rich:componentControl for="newFlightLinePopup"
						attachTo="cmbtnCreateNewFlightLine" operation="hide"
						event="oncomplete" />
				</a4j:commandButton>
			</h:panelGrid>
		</h:form>
	</rich:modalPanel>
</ui:composition>